home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / utils3 / rma / !RMAManagr / !Help next >
Text File  |  1993-09-21  |  11KB  |  305 lines

  1. =============================================================================
  2.  
  3.                           RMA-MANAGER © 1993 Topix
  4.                                
  5. =============================================================================
  6.  
  7.  
  8.  
  9.  
  10.                      -=-=-=-=-= INTRODUCTION =-=-=-=-=-
  11.  
  12. RMA-Manager is an environmental friendly product, in that it brings back to
  13. life, that what is in suspended animation.
  14. In more clear English: RMA-Manager tries to return memory-pages which are in
  15. free RMA-space.
  16. Still don't get it (I would neither)? Well let me explain it clearly with
  17. some 'technical' terms, after a quick history lesson:
  18.  
  19.  
  20.  
  21.  
  22.                    -=-=-=-=-= HISTORY OF TOPIX =-=-=-=-=-
  23.  
  24. Before you read any of the following I should warn you that not a word of it
  25. is true. 
  26.  
  27. Topix is in fact an organisation originally set up in 1955 as a highly
  28. secret group to organise underground resistance against a communist
  29. government should this ever come to power in Western Europe. With the
  30. chances of this ever happening sharply declining over the last couple of
  31. years it developed a severe crisis of identity, necessitating intensive
  32. psychiatric treatment for the leading figures within Topix. As a means of
  33. providing them with a new reason to live, their therapists decided to
  34. brainwash them into releasing Public Domain software for an obscure computer
  35. known only by insiders as "Archimedes". Although the brainwash was
  36. incomplete (still the members of Topix are only known by their code names
  37. 'Pervect', 'Logic' and 'Cardinal Biggles'), they proved to be able to reach
  38. an extremely high level of excellence at the task that was set for them.
  39.  
  40. So, if you're in some sort of computer trouble, and no-one else can help,
  41. maybe you can hire..... TOPIX!
  42.  
  43.  
  44.  
  45.  
  46.  
  47.                -=-=-=-=-= 'TECHNICAL' EXPLAINATION =-=-=-=-=-
  48.  
  49.  
  50. The RMA (Relocatable Module Area), also called 'Module area' (in the Tasks-
  51. window) is a linear,continuous block of memory in which modules are loaded
  52. and work space can be claimed from.
  53. When modules are killed or work space is released, free areas arise.
  54. The next time a module is loaded or work space is claimed, the OS will try to
  55. fill up those free areas. If none of the free areas is large enough to be
  56. able to perform the desired action on, your OS will try to enlarge the RMA.
  57.  
  58. In itself this method is quite nice. BUT: As the RMA is a continuous block
  59. of memory, the only time memory is released from it is when you shrink the
  60. RMA. And to be able to do that the end of the RMA must be a free area.
  61. Suppose your RMA looks like this:
  62.  
  63. start                                            end
  64. --------------------------------------------------
  65.  in use | in use | free | in use | free | in use |
  66.   8K    |   2K   |  57K |  34K   | 230K |   1K   |
  67. --------------------------------------------------
  68.  
  69. The only reason you can't get that 230K back is due to the 1K 'in use' at the
  70. end of RMA. Getting back the free 57K is also out of the question.
  71.  
  72. Situations like this very often occur: Suppose we have an empty RMA.
  73. Start up a (desktop) program which loads large modules and/or claims a lot of
  74. work space.:. Now load another program that uses RMA (more than the largest
  75. free block, in order to get the claimed space behind the RMA space used by
  76. the first program) or do something else that will cause the computer to claim 
  77. RMA space.
  78. Now kill the first program. It will kill its modules and workspace, causing
  79. a free area. This free area however is not at the end of RMA. It is followed
  80. by the 'in use' space of the second program.
  81. Suppose the size of the free area that has been caused by killing the first
  82. program is 280K. When you now start up another program, which claims 300K of
  83. workspace, the RMA has to be enlarged by 300K because the largest free area
  84. is 280K.
  85. You have 280K of memory in the RMA which is now not used and could be used
  86. to load other programs or enlarge RAM-discs, whatever you can do with memory 
  87. in the Next/Free area.
  88.  
  89.  
  90. What does RMA-Manager have to do with all of this?
  91. RMA-Manager would have given you that 280K of memory back!!!!
  92.  
  93. Well, not exactly 280K:
  94. RAM pages: 1MBytes machines have 128 pages of  8KBytes
  95.            2  "           "      "     128   "   of 16  "
  96.            4  "           "      "     128   "   of 32  "
  97.            8  "           "      "     256   "   of 32  "
  98.            
  99. RMA starts at the start of a page.
  100. You could see the RMA as a chain of pages.
  101.  
  102. Example: take a 2MBytes machine, 128 pages of 16KBytes.
  103. Lets say your RMA has a size of 160K. It then can be seen as a chain of 10
  104. pages. 'In use' and 'free' areas can start at any position within a page and
  105. continue over multiple pages. They can also end anywhere in a page. Therefore
  106. a page can contain more than one module or workspace or free areas.
  107. When an area is freed, RMA-Manager will give back pages which consist of free
  108. areas only.
  109. Suppose we free an area which starts at the start of page and has a size of
  110. 140K. At least 8 pages will be released now. 8*16=128, leaving (140-128)=
  111. 12K. The page containing the last 12K will only be released if it doesn't
  112. contain any (part of) modules or workspace.
  113.  
  114.  
  115. It all comes down to this:
  116. RMA-Manager returns all memory pages from RMA just being there and doing 
  117. nothing and containing nothing.
  118.  
  119.  
  120. I must say that I was surprised when I bought RISCOS-3 and discovered that
  121. this problem, which already existed in Arthur, still hadn't been solved by 
  122. Acorn.
  123. Ah well, it will from now on never bother you again.
  124.  
  125.  
  126.  
  127.  
  128.                   -=-=-=-=-= SOME OTHER THINGS =-=-=-=-=-
  129.  
  130.  
  131. Some other things:
  132.  
  133. When running the RMA-Manager the 'Module area' bar (in the Tasks-window) will
  134. indicate how much memory really is in RMA. The 'Free in module area' and 
  135. 'Largest block' will always indicate an area of 0K. Don't think that indeed
  136. there is 0K free in RMA. There almost is always free memory in RMA, but the
  137. free bars will from now on always just indicate 0K. 
  138. So 'Module area' can be 304K and the 'Free in module area'-bar indicates
  139. 0K. This means that the RMA is at least 304K large (it could as well be
  140. 640K) and contains only 304K of real memory. 
  141.  
  142.  
  143.  
  144.  
  145.               -=-=-=-=-= RISCOS-2/3 AND EXTRA SWI =-=-=-=-=-
  146.  
  147. RISCOS-2/3:
  148.  
  149. RMA-Manager should run on both RISCOS-2 and 3 machines.
  150.  
  151. Notice: RMA-Manager uses "OS_FindMemMapEntries", a SWI which didn't exist
  152. in RISCOS-2. I have enclosed this SWI in the RMA-Manager. So when running
  153. RMA-Manager you can also use "OS_FindMemMapEntries" on RISCOS-2 machines.
  154.  
  155. Here follows the description of "OS_FindMemMapEntries" (SWI &60):
  156.  
  157. entry: R0=pointer to buffer
  158.                     
  159.        buffer: a list of 3 words long info blocks
  160.                              
  161.                   info block: word 0  memory page number 
  162.                            word 1  logical address it is mapped to
  163.                            word 2  protection level
  164.                                      0  readable and writeable by everybody
  165.                                      1  read-only in user mode
  166.                                      2  inaccessible in user mode
  167.                                      
  168.        the list ends when word 0 of an info block is -1
  169.        
  170. exit:  per info block the memory page is searched for which is indeed mapped
  171.        to the logical address. The protection level will also be outputted.
  172.        
  173. example: suppose you want to know the page numbers of the pages which are
  174.          mapped to addresses &8000 and &C000, you first set up this list
  175.          
  176.   list:  word 0  page suggestion for address &8000
  177.          word 1  &8000
  178.          word 2  x
  179.          
  180.          word 3  page suggestion for address &C000
  181.          word 4  &C000
  182.          word 5  x
  183.          
  184.          word 6  -1
  185.          
  186.          SYS"OS_FindMemMapEntries",list
  187.          
  188.   list:  word 0  page mapped to address &8000 or -1 if not found
  189.        word 1  &8000
  190.        word 2  protection level of page mapped to address &8000 or 3
  191.                if page not found
  192.                
  193.          word 3  page mapped to address &C000 or -1 if not found
  194.        word 4  &C000
  195.        word 5  protection level of page mapped to address &C000 or 3
  196.                if page not found
  197.                
  198.        word 6  -1
  199.        
  200.                
  201.          If you have an idea of which page it might be that is mapped to a
  202.          certain address, you can enter that at the page suggestion. This
  203.          can decrease the time it takes to find the page number.
  204.          If you don't have a clue at all you should enter 0 for the page
  205.          suggestion.
  206.          
  207.          If there is no page at all mapped to a certain address, the page
  208.          number on output for that address will be set to -1.
  209.          
  210. NOTE: On RISCOS-2 you won't be able to type (or use )
  211.       'SYS "OS_FindMemMapEntries"' in BASIC or 'SWI "OS_FindMemMapEntries"'
  212.       in assembler. Use SYS &60 or SWI &60 instead !
  213.      
  214.      
  215.      
  216.       
  217.        
  218.                         -=-=-=-=-= HMMMM =-=-=-=-
  219.                     
  220.  
  221. Hmmm, this !Help text is already more than 3 times as large as the module it
  222. is about.....hmmmm.....
  223.  
  224. Well nothing to do about that.... we'll just go on and on and on and on...
  225.  
  226.  
  227. What is there more to say about RMA-Manager ???? Ah yeah,
  228.  
  229.  
  230.  
  231.  
  232.                     -=-=-=-=-= VERY IMPORTANT =-=-=-=-=-
  233.  
  234.  
  235. When initialising, RMA-Manager will not release free RMA memory, which was
  236. created before RMA-Manager was loaded. SO:
  237.  
  238. !! PUT RMA-MANAGER IN YOUR BOOT-SEQUENCE AND LOAD IT AS EARLY AS POSSIBLE !!
  239.                 (AFTER ANY VIRUS-KILLER MODULES OFCOURSE)
  240.  
  241.  
  242.  
  243.  
  244.                  
  245.                        -=-=-=-=-= GOOD BYE =-=-=-=-=-
  246.  
  247.  
  248. I hope that this program may be of some use for you, and hope to type to you
  249. again soon in the next Topix-release.
  250.  
  251.  
  252.  
  253.                          -=-=-=-=-= P.S. =-=-=-=-=-
  254.  
  255. P.S.: you are free to copy just the module to put it in your !Boot.Modules
  256. directory, but when copying for spreading, please copy the entire !RMAManagr 
  257. directory (!Help, !Run, !Sprites, RMAManager).
  258.  
  259.  
  260.  
  261.  
  262.  
  263.              -=-=-=-=-= ADDRESSES & TELEPHONE NUMBERS =-=-=-=-=-
  264.  
  265. To contact Topix write to:
  266.  
  267. Eli-Jean Leyssens (Pervect)
  268. Calslaan 13-201
  269. 7522 MH Enschede
  270. The Netherlands
  271.  
  272. or
  273.  
  274. Ferdinand Veldmans (Logic)
  275. Calslaan 13-210 (No, this is no typing error)
  276. 7522 MH Enschede
  277. The Netherlands
  278.  
  279. or 
  280.  
  281. Mark Koek (Cardinal Biggles)
  282. Flanorpad 2d
  283. 2333 AN Leiden
  284. The Netherlands
  285.  
  286.  
  287. Or if you think you can withstand my (Pervect) hypnotic voice, call me at:
  288.  
  289. int-code + 31 - 53 - 895020   (outside the Netherlands)
  290. 053 - 895020 (binnen Nederland)
  291. 895020 (binnen Enschede)
  292. 5020 (op de Campus)
  293. 0-9999-895020 (from the same phone)
  294. 20 (xguppoekopperaf)
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301. If this text went by too fast,
  302. I think you'll agree it's about
  303. bloody time you upgraded to 
  304. RISC-OS 3.
  305.